3.215 \(\int \frac {\sec (e+f x)}{(a+a \sec (e+f x)) (c+d \sec (e+f x))^2} \, dx\)

Optimal. Leaf size=145 \[ -\frac {d \tan (e+f x)}{f \left (c^2-d^2\right ) (a \sec (e+f x)+a) (c+d \sec (e+f x))}-\frac {2 d (2 c+d) \tanh ^{-1}\left (\frac {\sqrt {c-d} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c+d}}\right )}{a f (c-d)^{5/2} (c+d)^{3/2}}+\frac {(c+2 d) \tan (e+f x)}{f (c-d)^2 (c+d) (a \sec (e+f x)+a)} \]

[Out]

-2*d*(2*c+d)*arctanh((c-d)^(1/2)*tan(1/2*e+1/2*f*x)/(c+d)^(1/2))/a/(c-d)^(5/2)/(c+d)^(3/2)/f+(c+2*d)*tan(f*x+e
)/(c-d)^2/(c+d)/f/(a+a*sec(f*x+e))-d*tan(f*x+e)/(c^2-d^2)/f/(a+a*sec(f*x+e))/(c+d*sec(f*x+e))

________________________________________________________________________________________

Rubi [A]  time = 0.25, antiderivative size = 196, normalized size of antiderivative = 1.35, number of steps used = 6, number of rules used = 6, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.194, Rules used = {3987, 103, 152, 12, 93, 205} \[ -\frac {d \tan (e+f x)}{f \left (c^2-d^2\right ) (a \sec (e+f x)+a) (c+d \sec (e+f x))}+\frac {2 d (2 c+d) \tan (e+f x) \tan ^{-1}\left (\frac {\sqrt {c+d} \sqrt {a \sec (e+f x)+a}}{\sqrt {c-d} \sqrt {a-a \sec (e+f x)}}\right )}{f (c-d)^{5/2} (c+d)^{3/2} \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}+\frac {(c+2 d) \tan (e+f x)}{f (c-d)^2 (c+d) (a \sec (e+f x)+a)} \]

Antiderivative was successfully verified.

[In]

Int[Sec[e + f*x]/((a + a*Sec[e + f*x])*(c + d*Sec[e + f*x])^2),x]

[Out]

((c + 2*d)*Tan[e + f*x])/((c - d)^2*(c + d)*f*(a + a*Sec[e + f*x])) + (2*d*(2*c + d)*ArcTan[(Sqrt[c + d]*Sqrt[
a + a*Sec[e + f*x]])/(Sqrt[c - d]*Sqrt[a - a*Sec[e + f*x]])]*Tan[e + f*x])/((c - d)^(5/2)*(c + d)^(3/2)*f*Sqrt
[a - a*Sec[e + f*x]]*Sqrt[a + a*Sec[e + f*x]]) - (d*Tan[e + f*x])/((c^2 - d^2)*f*(a + a*Sec[e + f*x])*(c + d*S
ec[e + f*x]))

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 93

Int[(((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_))/((e_.) + (f_.)*(x_)), x_Symbol] :> With[{q = Denomin
ator[m]}, Dist[q, Subst[Int[x^(q*(m + 1) - 1)/(b*e - a*f - (d*e - c*f)*x^q), x], x, (a + b*x)^(1/q)/(c + d*x)^
(1/q)], x]] /; FreeQ[{a, b, c, d, e, f}, x] && EqQ[m + n + 1, 0] && RationalQ[n] && LtQ[-1, m, 0] && SimplerQ[
a + b*x, c + d*x]

Rule 103

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[(b*(a +
 b*x)^(m + 1)*(c + d*x)^(n + 1)*(e + f*x)^(p + 1))/((m + 1)*(b*c - a*d)*(b*e - a*f)), x] + Dist[1/((m + 1)*(b*
c - a*d)*(b*e - a*f)), Int[(a + b*x)^(m + 1)*(c + d*x)^n*(e + f*x)^p*Simp[a*d*f*(m + 1) - b*(d*e*(m + n + 2) +
 c*f*(m + p + 2)) - b*d*f*(m + n + p + 3)*x, x], x], x] /; FreeQ[{a, b, c, d, e, f, n, p}, x] && LtQ[m, -1] &&
 IntegerQ[m] && (IntegerQ[n] || IntegersQ[2*n, 2*p])

Rule 152

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_))^(p_)*((g_.) + (h_.)*(x_)), x_Symb
ol] :> Simp[((b*g - a*h)*(a + b*x)^(m + 1)*(c + d*x)^(n + 1)*(e + f*x)^(p + 1))/((m + 1)*(b*c - a*d)*(b*e - a*
f)), x] + Dist[1/((m + 1)*(b*c - a*d)*(b*e - a*f)), Int[(a + b*x)^(m + 1)*(c + d*x)^n*(e + f*x)^p*Simp[(a*d*f*
g - b*(d*e + c*f)*g + b*c*e*h)*(m + 1) - (b*g - a*h)*(d*e*(n + 1) + c*f*(p + 1)) - d*f*(b*g - a*h)*(m + n + p
+ 3)*x, x], x], x] /; FreeQ[{a, b, c, d, e, f, g, h, n, p}, x] && LtQ[m, -1] && IntegersQ[2*m, 2*n, 2*p]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 3987

Int[(csc[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]
*(d_.) + (c_))^(n_), x_Symbol] :> Dist[(a^2*g*Cot[e + f*x])/(f*Sqrt[a + b*Csc[e + f*x]]*Sqrt[a - b*Csc[e + f*x
]]), Subst[Int[((g*x)^(p - 1)*(a + b*x)^(m - 1/2)*(c + d*x)^n)/Sqrt[a - b*x], x], x, Csc[e + f*x]], x] /; Free
Q[{a, b, c, d, e, f, g, m, n, p}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && (EqQ[p,
 1] || IntegerQ[m - 1/2])

Rubi steps

\begin {align*} \int \frac {\sec (e+f x)}{(a+a \sec (e+f x)) (c+d \sec (e+f x))^2} \, dx &=-\frac {\left (a^2 \tan (e+f x)\right ) \operatorname {Subst}\left (\int \frac {1}{\sqrt {a-a x} (a+a x)^{3/2} (c+d x)^2} \, dx,x,\sec (e+f x)\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}\\ &=-\frac {d \tan (e+f x)}{\left (c^2-d^2\right ) f (a+a \sec (e+f x)) (c+d \sec (e+f x))}-\frac {\tan (e+f x) \operatorname {Subst}\left (\int \frac {a^2 (c+d)-a^2 d x}{\sqrt {a-a x} (a+a x)^{3/2} (c+d x)} \, dx,x,\sec (e+f x)\right )}{\left (c^2-d^2\right ) f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}\\ &=\frac {(c+2 d) \tan (e+f x)}{(c-d)^2 (c+d) f (a+a \sec (e+f x))}-\frac {d \tan (e+f x)}{\left (c^2-d^2\right ) f (a+a \sec (e+f x)) (c+d \sec (e+f x))}+\frac {\tan (e+f x) \operatorname {Subst}\left (\int \frac {a^4 d (2 c+d)}{\sqrt {a-a x} \sqrt {a+a x} (c+d x)} \, dx,x,\sec (e+f x)\right )}{a^3 (c-d) \left (c^2-d^2\right ) f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}\\ &=\frac {(c+2 d) \tan (e+f x)}{(c-d)^2 (c+d) f (a+a \sec (e+f x))}-\frac {d \tan (e+f x)}{\left (c^2-d^2\right ) f (a+a \sec (e+f x)) (c+d \sec (e+f x))}+\frac {(a d (2 c+d) \tan (e+f x)) \operatorname {Subst}\left (\int \frac {1}{\sqrt {a-a x} \sqrt {a+a x} (c+d x)} \, dx,x,\sec (e+f x)\right )}{(c-d) \left (c^2-d^2\right ) f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}\\ &=\frac {(c+2 d) \tan (e+f x)}{(c-d)^2 (c+d) f (a+a \sec (e+f x))}-\frac {d \tan (e+f x)}{\left (c^2-d^2\right ) f (a+a \sec (e+f x)) (c+d \sec (e+f x))}+\frac {(2 a d (2 c+d) \tan (e+f x)) \operatorname {Subst}\left (\int \frac {1}{a c-a d-(-a c-a d) x^2} \, dx,x,\frac {\sqrt {a+a \sec (e+f x)}}{\sqrt {a-a \sec (e+f x)}}\right )}{(c-d) \left (c^2-d^2\right ) f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}\\ &=\frac {(c+2 d) \tan (e+f x)}{(c-d)^2 (c+d) f (a+a \sec (e+f x))}+\frac {2 d (2 c+d) \tan ^{-1}\left (\frac {\sqrt {c+d} \sqrt {a+a \sec (e+f x)}}{\sqrt {c-d} \sqrt {a-a \sec (e+f x)}}\right ) \tan (e+f x)}{(c-d)^{5/2} (c+d)^{3/2} f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}-\frac {d \tan (e+f x)}{\left (c^2-d^2\right ) f (a+a \sec (e+f x)) (c+d \sec (e+f x))}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 3.25, size = 286, normalized size = 1.97 \[ \frac {2 \cos \left (\frac {1}{2} (e+f x)\right ) \sec ^3(e+f x) (c \cos (e+f x)+d) \left (\frac {2 d (2 c+d) (\sin (e)+i \cos (e)) \cos \left (\frac {1}{2} (e+f x)\right ) (c \cos (e+f x)+d) \tan ^{-1}\left (\frac {(\sin (e)+i \cos (e)) \left (\tan \left (\frac {f x}{2}\right ) (c \cos (e)-d)+c \sin (e)\right )}{\sqrt {c^2-d^2} \sqrt {(\cos (e)-i \sin (e))^2}}\right )}{(c+d) \sqrt {c^2-d^2} \sqrt {(\cos (e)-i \sin (e))^2}}+\frac {d^2 \cos \left (\frac {1}{2} (e+f x)\right ) (c \sin (f x)-d \sin (e))}{c (c+d) \left (\cos \left (\frac {e}{2}\right )-\sin \left (\frac {e}{2}\right )\right ) \left (\sin \left (\frac {e}{2}\right )+\cos \left (\frac {e}{2}\right )\right )}+\sec \left (\frac {e}{2}\right ) \sin \left (\frac {f x}{2}\right ) (c \cos (e+f x)+d)\right )}{a f (c-d)^2 (\sec (e+f x)+1) (c+d \sec (e+f x))^2} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[e + f*x]/((a + a*Sec[e + f*x])*(c + d*Sec[e + f*x])^2),x]

[Out]

(2*Cos[(e + f*x)/2]*(d + c*Cos[e + f*x])*Sec[e + f*x]^3*((2*d*(2*c + d)*ArcTan[((I*Cos[e] + Sin[e])*(c*Sin[e]
+ (-d + c*Cos[e])*Tan[(f*x)/2]))/(Sqrt[c^2 - d^2]*Sqrt[(Cos[e] - I*Sin[e])^2])]*Cos[(e + f*x)/2]*(d + c*Cos[e
+ f*x])*(I*Cos[e] + Sin[e]))/((c + d)*Sqrt[c^2 - d^2]*Sqrt[(Cos[e] - I*Sin[e])^2]) + (d + c*Cos[e + f*x])*Sec[
e/2]*Sin[(f*x)/2] + (d^2*Cos[(e + f*x)/2]*(-(d*Sin[e]) + c*Sin[f*x]))/(c*(c + d)*(Cos[e/2] - Sin[e/2])*(Cos[e/
2] + Sin[e/2]))))/(a*(c - d)^2*f*(1 + Sec[e + f*x])*(c + d*Sec[e + f*x])^2)

________________________________________________________________________________________

fricas [B]  time = 0.48, size = 691, normalized size = 4.77 \[ \left [\frac {{\left (2 \, c d^{2} + d^{3} + {\left (2 \, c^{2} d + c d^{2}\right )} \cos \left (f x + e\right )^{2} + {\left (2 \, c^{2} d + 3 \, c d^{2} + d^{3}\right )} \cos \left (f x + e\right )\right )} \sqrt {c^{2} - d^{2}} \log \left (\frac {2 \, c d \cos \left (f x + e\right ) - {\left (c^{2} - 2 \, d^{2}\right )} \cos \left (f x + e\right )^{2} - 2 \, \sqrt {c^{2} - d^{2}} {\left (d \cos \left (f x + e\right ) + c\right )} \sin \left (f x + e\right ) + 2 \, c^{2} - d^{2}}{c^{2} \cos \left (f x + e\right )^{2} + 2 \, c d \cos \left (f x + e\right ) + d^{2}}\right ) + 2 \, {\left (c^{3} d + 2 \, c^{2} d^{2} - c d^{3} - 2 \, d^{4} + {\left (c^{4} + c^{3} d - c d^{3} - d^{4}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{2 \, {\left ({\left (a c^{6} - a c^{5} d - 2 \, a c^{4} d^{2} + 2 \, a c^{3} d^{3} + a c^{2} d^{4} - a c d^{5}\right )} f \cos \left (f x + e\right )^{2} + {\left (a c^{6} - 3 \, a c^{4} d^{2} + 3 \, a c^{2} d^{4} - a d^{6}\right )} f \cos \left (f x + e\right ) + {\left (a c^{5} d - a c^{4} d^{2} - 2 \, a c^{3} d^{3} + 2 \, a c^{2} d^{4} + a c d^{5} - a d^{6}\right )} f\right )}}, -\frac {{\left (2 \, c d^{2} + d^{3} + {\left (2 \, c^{2} d + c d^{2}\right )} \cos \left (f x + e\right )^{2} + {\left (2 \, c^{2} d + 3 \, c d^{2} + d^{3}\right )} \cos \left (f x + e\right )\right )} \sqrt {-c^{2} + d^{2}} \arctan \left (-\frac {\sqrt {-c^{2} + d^{2}} {\left (d \cos \left (f x + e\right ) + c\right )}}{{\left (c^{2} - d^{2}\right )} \sin \left (f x + e\right )}\right ) - {\left (c^{3} d + 2 \, c^{2} d^{2} - c d^{3} - 2 \, d^{4} + {\left (c^{4} + c^{3} d - c d^{3} - d^{4}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{{\left (a c^{6} - a c^{5} d - 2 \, a c^{4} d^{2} + 2 \, a c^{3} d^{3} + a c^{2} d^{4} - a c d^{5}\right )} f \cos \left (f x + e\right )^{2} + {\left (a c^{6} - 3 \, a c^{4} d^{2} + 3 \, a c^{2} d^{4} - a d^{6}\right )} f \cos \left (f x + e\right ) + {\left (a c^{5} d - a c^{4} d^{2} - 2 \, a c^{3} d^{3} + 2 \, a c^{2} d^{4} + a c d^{5} - a d^{6}\right )} f}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)/(a+a*sec(f*x+e))/(c+d*sec(f*x+e))^2,x, algorithm="fricas")

[Out]

[1/2*((2*c*d^2 + d^3 + (2*c^2*d + c*d^2)*cos(f*x + e)^2 + (2*c^2*d + 3*c*d^2 + d^3)*cos(f*x + e))*sqrt(c^2 - d
^2)*log((2*c*d*cos(f*x + e) - (c^2 - 2*d^2)*cos(f*x + e)^2 - 2*sqrt(c^2 - d^2)*(d*cos(f*x + e) + c)*sin(f*x +
e) + 2*c^2 - d^2)/(c^2*cos(f*x + e)^2 + 2*c*d*cos(f*x + e) + d^2)) + 2*(c^3*d + 2*c^2*d^2 - c*d^3 - 2*d^4 + (c
^4 + c^3*d - c*d^3 - d^4)*cos(f*x + e))*sin(f*x + e))/((a*c^6 - a*c^5*d - 2*a*c^4*d^2 + 2*a*c^3*d^3 + a*c^2*d^
4 - a*c*d^5)*f*cos(f*x + e)^2 + (a*c^6 - 3*a*c^4*d^2 + 3*a*c^2*d^4 - a*d^6)*f*cos(f*x + e) + (a*c^5*d - a*c^4*
d^2 - 2*a*c^3*d^3 + 2*a*c^2*d^4 + a*c*d^5 - a*d^6)*f), -((2*c*d^2 + d^3 + (2*c^2*d + c*d^2)*cos(f*x + e)^2 + (
2*c^2*d + 3*c*d^2 + d^3)*cos(f*x + e))*sqrt(-c^2 + d^2)*arctan(-sqrt(-c^2 + d^2)*(d*cos(f*x + e) + c)/((c^2 -
d^2)*sin(f*x + e))) - (c^3*d + 2*c^2*d^2 - c*d^3 - 2*d^4 + (c^4 + c^3*d - c*d^3 - d^4)*cos(f*x + e))*sin(f*x +
 e))/((a*c^6 - a*c^5*d - 2*a*c^4*d^2 + 2*a*c^3*d^3 + a*c^2*d^4 - a*c*d^5)*f*cos(f*x + e)^2 + (a*c^6 - 3*a*c^4*
d^2 + 3*a*c^2*d^4 - a*d^6)*f*cos(f*x + e) + (a*c^5*d - a*c^4*d^2 - 2*a*c^3*d^3 + 2*a*c^2*d^4 + a*c*d^5 - a*d^6
)*f)]

________________________________________________________________________________________

giac [A]  time = 0.30, size = 228, normalized size = 1.57 \[ -\frac {\frac {2 \, d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{{\left (a c^{3} - a c^{2} d - a c d^{2} + a d^{3}\right )} {\left (c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - c - d\right )}} - \frac {2 \, {\left (\pi \left \lfloor \frac {f x + e}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (2 \, c - 2 \, d\right ) + \arctan \left (\frac {c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{\sqrt {-c^{2} + d^{2}}}\right )\right )} {\left (2 \, c d + d^{2}\right )}}{{\left (a c^{3} - a c^{2} d - a c d^{2} + a d^{3}\right )} \sqrt {-c^{2} + d^{2}}} - \frac {\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{a c^{2} - 2 \, a c d + a d^{2}}}{f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)/(a+a*sec(f*x+e))/(c+d*sec(f*x+e))^2,x, algorithm="giac")

[Out]

-(2*d^2*tan(1/2*f*x + 1/2*e)/((a*c^3 - a*c^2*d - a*c*d^2 + a*d^3)*(c*tan(1/2*f*x + 1/2*e)^2 - d*tan(1/2*f*x +
1/2*e)^2 - c - d)) - 2*(pi*floor(1/2*(f*x + e)/pi + 1/2)*sgn(2*c - 2*d) + arctan((c*tan(1/2*f*x + 1/2*e) - d*t
an(1/2*f*x + 1/2*e))/sqrt(-c^2 + d^2)))*(2*c*d + d^2)/((a*c^3 - a*c^2*d - a*c*d^2 + a*d^3)*sqrt(-c^2 + d^2)) -
 tan(1/2*f*x + 1/2*e)/(a*c^2 - 2*a*c*d + a*d^2))/f

________________________________________________________________________________________

maple [A]  time = 0.79, size = 146, normalized size = 1.01 \[ \frac {\frac {\tan \left (\frac {e}{2}+\frac {f x}{2}\right )}{c^{2}-2 c d +d^{2}}+\frac {4 d \left (-\frac {d \tan \left (\frac {e}{2}+\frac {f x}{2}\right )}{2 \left (c +d \right ) \left (\left (\tan ^{2}\left (\frac {e}{2}+\frac {f x}{2}\right )\right ) c -\left (\tan ^{2}\left (\frac {e}{2}+\frac {f x}{2}\right )\right ) d -c -d \right )}-\frac {\left (2 c +d \right ) \arctanh \left (\frac {\tan \left (\frac {e}{2}+\frac {f x}{2}\right ) \left (c -d \right )}{\sqrt {\left (c +d \right ) \left (c -d \right )}}\right )}{2 \left (c +d \right ) \sqrt {\left (c +d \right ) \left (c -d \right )}}\right )}{\left (c -d \right )^{2}}}{f a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(f*x+e)/(a+a*sec(f*x+e))/(c+d*sec(f*x+e))^2,x)

[Out]

1/f/a*(1/(c^2-2*c*d+d^2)*tan(1/2*e+1/2*f*x)+4*d/(c-d)^2*(-1/2*d/(c+d)*tan(1/2*e+1/2*f*x)/(tan(1/2*e+1/2*f*x)^2
*c-tan(1/2*e+1/2*f*x)^2*d-c-d)-1/2*(2*c+d)/(c+d)/((c+d)*(c-d))^(1/2)*arctanh(tan(1/2*e+1/2*f*x)*(c-d)/((c+d)*(
c-d))^(1/2))))

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)/(a+a*sec(f*x+e))/(c+d*sec(f*x+e))^2,x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*c^2-4*d^2>0)', see `assume?`
 for more details)Is 4*c^2-4*d^2 positive or negative?

________________________________________________________________________________________

mupad [B]  time = 2.04, size = 187, normalized size = 1.29 \[ \frac {\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{a\,f\,{\left (c-d\right )}^2}-\frac {2\,d^2\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{f\,\left (c+d\right )\,\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (a\,c^3-3\,a\,c^2\,d+3\,a\,c\,d^2-a\,d^3\right )-a\,d^3-a\,c^3+a\,c\,d^2+a\,c^2\,d\right )}-\frac {2\,d\,\mathrm {atanh}\left (\frac {\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (2\,c-2\,d\right )\,\left (a\,c^2-2\,a\,c\,d+a\,d^2\right )}{2\,a\,\sqrt {c+d}\,{\left (c-d\right )}^{5/2}}\right )\,\left (2\,c+d\right )}{a\,f\,{\left (c+d\right )}^{3/2}\,{\left (c-d\right )}^{5/2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(cos(e + f*x)*(a + a/cos(e + f*x))*(c + d/cos(e + f*x))^2),x)

[Out]

tan(e/2 + (f*x)/2)/(a*f*(c - d)^2) - (2*d^2*tan(e/2 + (f*x)/2))/(f*(c + d)*(tan(e/2 + (f*x)/2)^2*(a*c^3 - a*d^
3 + 3*a*c*d^2 - 3*a*c^2*d) - a*d^3 - a*c^3 + a*c*d^2 + a*c^2*d)) - (2*d*atanh((tan(e/2 + (f*x)/2)*(2*c - 2*d)*
(a*c^2 + a*d^2 - 2*a*c*d))/(2*a*(c + d)^(1/2)*(c - d)^(5/2)))*(2*c + d))/(a*f*(c + d)^(3/2)*(c - d)^(5/2))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {\sec {\left (e + f x \right )}}{c^{2} \sec {\left (e + f x \right )} + c^{2} + 2 c d \sec ^{2}{\left (e + f x \right )} + 2 c d \sec {\left (e + f x \right )} + d^{2} \sec ^{3}{\left (e + f x \right )} + d^{2} \sec ^{2}{\left (e + f x \right )}}\, dx}{a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)/(a+a*sec(f*x+e))/(c+d*sec(f*x+e))**2,x)

[Out]

Integral(sec(e + f*x)/(c**2*sec(e + f*x) + c**2 + 2*c*d*sec(e + f*x)**2 + 2*c*d*sec(e + f*x) + d**2*sec(e + f*
x)**3 + d**2*sec(e + f*x)**2), x)/a

________________________________________________________________________________________